.class public final Lcom/greystripe/sdk/GSFullscreenAd;
.super Lcom/greystripe/sdk/c;


# static fields
.field protected static c:Lcom/greystripe/sdk/GSFullscreenAd;

.field private static e:Z


# instance fields
.field protected d:Lcom/greystripe/sdk/at;

.field private f:Landroid/content/Context;

.field private g:Z

.field private h:Lcom/greystripe/sdk/as;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/4 v0, 0x0

    sput-boolean v0, Lcom/greystripe/sdk/GSFullscreenAd;->e:Z

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/greystripe/sdk/GSFullscreenAd;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
    .locals 4

    const/4 v3, 0x0

    invoke-direct {p0, p1}, Lcom/greystripe/sdk/c;-><init>(Landroid/content/Context;)V

    iput-boolean v3, p0, Lcom/greystripe/sdk/GSFullscreenAd;->g:Z

    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lcom/greystripe/sdk/GSFullscreenAd;->f:Landroid/content/Context;

    const-string v0, "s"

    const-string v1, "fs"

    invoke-virtual {p0, v0, v1}, Lcom/greystripe/sdk/GSFullscreenAd;->a(Ljava/lang/String;Ljava/lang/String;)V

    sget-object v0, Lcom/greystripe/sdk/bk;->GUID:Lcom/greystripe/sdk/bk;

    invoke-static {v0}, Lcom/greystripe/sdk/bj;->b(Lcom/greystripe/sdk/bk;)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-static {p2}, Lcom/greystripe/sdk/bj;->a(Ljava/lang/String;)V

    :cond_0
    const-string v0, "guid"

    invoke-static {}, Lcom/greystripe/sdk/bj;->b()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v0, v1}, Lcom/greystripe/sdk/GSFullscreenAd;->a(Ljava/lang/String;Ljava/lang/String;)V

    new-instance v0, Lcom/greystripe/sdk/as;

    invoke-direct {v0}, Lcom/greystripe/sdk/as;-><init>()V

    iput-object v0, p0, Lcom/greystripe/sdk/GSFullscreenAd;->h:Lcom/greystripe/sdk/as;

    invoke-virtual {p0}, Lcom/greystripe/sdk/GSFullscreenAd;->j()Lcom/greystripe/sdk/aa;

    move-result-object v0

    iget-object v1, p0, Lcom/greystripe/sdk/GSFullscreenAd;->h:Lcom/greystripe/sdk/as;

    const-string v2, "FullscreenController"

    invoke-virtual {v0, v1, v2}, Lcom/greystripe/sdk/aa;->addJavascriptInterface(Ljava/lang/Object;Ljava/lang/String;)V

    new-instance v0, Lcom/greystripe/sdk/at;

    invoke-direct {v0, p0}, Lcom/greystripe/sdk/at;-><init>(Lcom/greystripe/sdk/c;)V

    iput-object v0, p0, Lcom/greystripe/sdk/GSFullscreenAd;->d:Lcom/greystripe/sdk/at;

    invoke-virtual {p0}, Lcom/greystripe/sdk/GSFullscreenAd;->j()Lcom/greystripe/sdk/aa;

    move-result-object v0

    iget-object v1, p0, Lcom/greystripe/sdk/GSFullscreenAd;->d:Lcom/greystripe/sdk/at;

    const-string v2, "Video"

    invoke-virtual {v0, v1, v2}, Lcom/greystripe/sdk/aa;->addJavascriptInterface(Ljava/lang/Object;Ljava/lang/String;)V

    new-instance v0, Lcom/greystripe/sdk/bb;

    invoke-direct {v0, p0, v3}, Lcom/greystripe/sdk/bb;-><init>(Lcom/greystripe/sdk/GSFullscreenAd;B)V

    invoke-super {p0, v0}, Lcom/greystripe/sdk/c;->addListener(Lcom/greystripe/sdk/GSAdListener;)V

    return-void
.end method

.method static synthetic a(Lcom/greystripe/sdk/GSFullscreenAd;)Z
    .locals 1

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/greystripe/sdk/GSFullscreenAd;->g:Z

    return v0
.end method


# virtual methods
.method final a()V
    .locals 1

    const/4 v0, 0x1

    sput-boolean v0, Lcom/greystripe/sdk/GSFullscreenAd;->e:Z

    return-void
.end method

.method final a(Lcom/greystripe/sdk/GSFullscreenActivity;)V
    .locals 1

    iget-object v0, p0, Lcom/greystripe/sdk/GSFullscreenAd;->h:Lcom/greystripe/sdk/as;

    invoke-virtual {v0, p1}, Lcom/greystripe/sdk/as;->a(Lcom/greystripe/sdk/GSFullscreenActivity;)V

    return-void
.end method

.method public final bridge synthetic addListener(Lcom/greystripe/sdk/GSAdListener;)V
    .locals 0

    invoke-super {p0, p1}, Lcom/greystripe/sdk/c;->addListener(Lcom/greystripe/sdk/GSAdListener;)V

    return-void
.end method

.method final b()V
    .locals 1

    const/4 v0, 0x0

    sput-boolean v0, Lcom/greystripe/sdk/GSFullscreenAd;->e:Z

    return-void
.end method

.method final c()V
    .locals 1

    iget-object v0, p0, Lcom/greystripe/sdk/GSFullscreenAd;->h:Lcom/greystripe/sdk/as;

    invoke-virtual {v0}, Lcom/greystripe/sdk/as;->close()V

    return-void
.end method

.method public final declared-synchronized display()V
    .locals 3

    monitor-enter p0

    :try_start_0
    invoke-virtual {p0}, Lcom/greystripe/sdk/GSFullscreenAd;->isAdReady()Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v0

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    monitor-exit p0

    return-void

    :cond_1
    :try_start_1
    sget-object v0, Lcom/greystripe/sdk/GSFullscreenAd;->c:Lcom/greystripe/sdk/GSFullscreenAd;

    if-nez v0, :cond_0

    sput-object p0, Lcom/greystripe/sdk/GSFullscreenAd;->c:Lcom/greystripe/sdk/GSFullscreenAd;

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/greystripe/sdk/GSFullscreenAd;->g:Z

    new-instance v0, Landroid/content/Intent;

    iget-object v1, p0, Lcom/greystripe/sdk/GSFullscreenAd;->f:Landroid/content/Context;

    const-class v2, Lcom/greystripe/sdk/GSFullscreenActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const/high16 v1, 0x1000

    invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    iget-object v1, p0, Lcom/greystripe/sdk/GSFullscreenAd;->f:Landroid/content/Context;

    invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public final declared-synchronized fetch()V
    .locals 2

    monitor-enter p0

    :try_start_0
    invoke-virtual {p0}, Lcom/greystripe/sdk/GSFullscreenAd;->e()Z

    move-result v0

    if-eqz v0, :cond_0

    const-string v0, "There\'s an ad already displayed. Cannot request another ad at this time."

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/Object;

    invoke-static {v0, v1}, Lcom/greystripe/sdk/bd;->d(Ljava/lang/String;[Ljava/lang/Object;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :goto_0
    monitor-exit p0

    return-void

    :cond_0
    :try_start_1
    invoke-virtual {p0}, Lcom/greystripe/sdk/GSFullscreenAd;->isAdReady()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-virtual {p0}, Lcom/greystripe/sdk/GSFullscreenAd;->g()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0

    :cond_1
    :try_start_2
    sget-boolean v0, Lcom/greystripe/sdk/GSFullscreenAd;->e:Z

    if-eqz v0, :cond_2

    sget-object v0, Lcom/greystripe/sdk/GSAdErrorCode;->FETCH_LIMIT_EXCEEDED:Lcom/greystripe/sdk/GSAdErrorCode;

    invoke-virtual {p0, v0}, Lcom/greystripe/sdk/GSFullscreenAd;->a(Lcom/greystripe/sdk/GSAdErrorCode;)V

    goto :goto_0

    :cond_2
    invoke-virtual {p0}, Lcom/greystripe/sdk/GSFullscreenAd;->h()V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_0
.end method

.method public final bridge synthetic getId()I
    .locals 1

    invoke-super {p0}, Lcom/greystripe/sdk/c;->getId()I

    move-result v0

    return v0
.end method

.method public final bridge synthetic isAdReady()Z
    .locals 1

    invoke-super {p0}, Lcom/greystripe/sdk/c;->isAdReady()Z

    move-result v0

    return v0
.end method

.method final k()V
    .locals 2

    invoke-virtual {p0}, Lcom/greystripe/sdk/GSFullscreenAd;->j()Lcom/greystripe/sdk/aa;

    move-result-object v0

    const-string v1, "RAC.close();"

    invoke-virtual {v0, v1}, Lcom/greystripe/sdk/aa;->b(Ljava/lang/String;)V

    return-void
.end method

.method final l()Z
    .locals 1

    iget-boolean v0, p0, Lcom/greystripe/sdk/GSFullscreenAd;->g:Z

    return v0
.end method

.method final m()I
    .locals 1

    iget-object v0, p0, Lcom/greystripe/sdk/GSFullscreenAd;->h:Lcom/greystripe/sdk/as;

    invoke-virtual {v0}, Lcom/greystripe/sdk/as;->getOrientation()I

    move-result v0

    return v0
.end method

.method final n()V
    .locals 1

    iget-object v0, p0, Lcom/greystripe/sdk/GSFullscreenAd;->h:Lcom/greystripe/sdk/as;

    invoke-virtual {v0}, Lcom/greystripe/sdk/as;->a()V

    return-void
.end method

.method public final bridge synthetic onLocationUpdated(Landroid/location/Location;)V
    .locals 0

    invoke-super {p0, p1}, Lcom/greystripe/sdk/c;->onLocationUpdated(Landroid/location/Location;)V

    return-void
.end method

.method public final bridge synthetic removeListener(Lcom/greystripe/sdk/GSAdListener;)V
    .locals 0

    invoke-super {p0, p1}, Lcom/greystripe/sdk/c;->removeListener(Lcom/greystripe/sdk/GSAdListener;)V

    return-void
.end method
